/*
 * OrganismEditorFrame.java
 *
 * Created on January 10, 2008, 12:51 PM
 * @author  Team KARP
 */

package protovitae.ui;

import javax.swing.DefaultListModel;
import protovitae.data.Gene;

public class OrganismEditorFrame extends javax.swing.JFrame {
    private DefaultListModel activetraits = new DefaultListModel(),traitlist = new DefaultListModel(); //The two lists in this window.
    private MainWindow parent = null;
    
    /** Creates new form OrganismEditorFrame */
    public OrganismEditorFrame(MainWindow parent) {
        this.parent = parent;
        initComponents();
        
        //To do: Call a function here that will populate the lists.
        //Temporary code for this:
        Gene temp1 = new Gene();
        Gene temp2 = new Gene();
        Gene temp3 = new Gene();
        temp1.setName("Flocking");
        temp2.setName("Shyness");
        temp3.setName("Curiosity");
        activetraits.addElement(temp1);
        traitlist.addElement(temp2);
        traitlist.addElement(temp3);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        orgnaismEditPanel = new OrganismEditorPanel(parent);
        mnuBar = new javax.swing.JMenuBar();
        mnuFile = new javax.swing.JMenu();
        mnuNewTrait = new javax.swing.JMenuItem();
        mnuImportTrait = new javax.swing.JMenuItem();
        mnuFileEditTrait = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Edit Organism");

        orgnaismEditPanel.setLayout(new java.awt.GridLayout());
        getContentPane().add(orgnaismEditPanel, java.awt.BorderLayout.CENTER);

        mnuFile.setText("File");

        mnuNewTrait.setText("New trait...");
        mnuFile.add(mnuNewTrait);

        mnuImportTrait.setText("Import trait...");
        mnuFile.add(mnuImportTrait);

        mnuFileEditTrait.setText("Edit selected trait...");
        mnuFile.add(mnuFileEditTrait);

        mnuBar.add(mnuFile);

        setJMenuBar(mnuBar);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-515)/2, (screenSize.height-368)/2, 515, 368);
    }// </editor-fold>//GEN-END:initComponents
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar mnuBar;
    private javax.swing.JMenu mnuFile;
    private javax.swing.JMenuItem mnuFileEditTrait;
    private javax.swing.JMenuItem mnuImportTrait;
    private javax.swing.JMenuItem mnuNewTrait;
    private javax.swing.JPanel orgnaismEditPanel;
    // End of variables declaration//GEN-END:variables
    
}
